import yaml


def yaml_read(file, encoding="utf8"):
    with open(file, encoding=encoding) as f:
        data = yaml.load(f.read(), Loader=yaml.FullLoader)
    return data
